    <script type="text/javascript">
    $(function(){
       $('#check_coupon').click(function(){
           var price = '<?php echo $this->_var['goods_info']['price']; ?>';
           var coupon_sn = $('#coupon_sn').val();
           if(coupon_sn == '')
           {
               return;
           }
           //{coupon_sn: coupon_sn, store_id: '<?php echo $_GET['store_id']; ?>'}
           $.getJSON("index.php?app=order&act=check_coupon", {"coupon_sn":coupon_sn,"store_id":<?php echo $this->_var['store_id']; ?>, "price":price, "t":new Date().getTime()}, function(data){
               var msg = data.msg;
               if(data['retval']) {
                   $('.unusable').hide();
                   var str = price_format(data['retval']['price']);
                   $('.usable').show().html(msg + str).css("display","inline-block");
               } else {
                   $('.usable').hide();
                   $('.unusable').show().html(msg).css("display","inline-block");
                   $('#coupon_sn').val('');
               }
           });
       });



        /**
         * 积分相关验证
         * @author lz
         * @time 2015-6-9
         */
        /*$("#order_form").submit(function() {
            var obj = $("#integral");
            var integral = obj.val();
            var remain = $("#remain").attr('remain');
            $("#error").remove();
            if(!isNaN(integral)) {
                if(Number(integral) > Number(remain)) {
                    obj.next('label').append("<span id='error'>请输入正确的积分数量！</span>");
                    $("#integral").focus();
                    return false;
                } else {
                    return true;
                }
            }else {
                obj.next('label').append("<span id='error'>请输入数字！</span>");
                $("#integral").focus();
                return false;
            }
        });*/

   });
    </script>
    <div class="make_sure">
        <p>订单总价:&nbsp;
            <strong class="fontsize3" id="order_amount" ><?php echo price_format($this->_var['goods_info']['amount']); ?></strong>
            <?php if ($this->_var['goods_info']['allow_coupon']): ?>&nbsp;&nbsp;<!--<input type="button" class="btn1" onclick="$(this).parent('p').next().toggle();$('#coupon_sn').val('');" />--><?php endif; ?>
        </p>
       <?php if ($this->_var['goods_info']['allow_coupon']): ?>
        <p style="">优惠券编号:&nbsp;
        <input type="text" name="coupon_sn" id="coupon_sn" class="text" />
        <input type="button" value="检查" class="check" id="check_coupon" />

        <span class="usable">有效 该优惠券的优惠价格为</span> <span class="unusable">无效的优惠券.您可以到 <a href='index.php?app=my_coupon'>我的优惠券</a> 登记或者查询具体的优惠券信息</span>
        </p>
        <?php endif; ?>
        
       <!-- <p>
            当前可用积分余额：<strong class="fontsize1" id="remain" remain="<?php echo $this->_var['remain']; ?>"><?php echo $this->_var['remain']; ?></strong>  （100积分可以抵1元人民币）
        </p>
        <p>
            请输入要使用的积分数量：
            <input  type="text" name="integral" id="integral" class="text" />&nbsp;
            <label style='color: #ff0000'></label>
        </p>-->
        <p>
            <a href="javascript:void($('#order_form').submit());" class="btn">下单完成并支付</a>
            <a href="<?php echo url('app=cart&act=index&store_id=' . $this->_var['goods_info']['store_id']. ''); ?>" class="back">返回购物车</a>
        </p>
    </div>
